﻿<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
class SCTV_CustomerGroupInstall extends ModuleInstall {
    public function install() {  
		Base_ThemeCommon::install_default_theme($this->get_type());
	
		$fields = array(
			array('name'=>_M('Name'), 'type'=>'text', 'param'=>32, 'required'=>true, 'visible'=>true),
			array('name'=>_M('Description'), 'type'=>'long text', 'required'=>false, 'visible'=>false)
		);
		
		Utils_RecordBrowserCommon::install_new_recordset('SCTV_CustomerGroup', $fields);
		Utils_RecordBrowserCommon::set_caption('SCTV_CustomerGroup', _M('Customer Group'));
		Utils_RecordBrowserCommon::add_default_access('SCTV_CustomerGroup');
        return true;
    }
 
    public function uninstall() {
		Base_ThemeCommon::uninstall_default_theme($this->get_type());
		Utils_RecordBrowserCommon::uninstall_recordset('SCTV_CustomerGroup');
		return true;		
    }
 
    public function info() {
        return array(
        	'Author'=>'Pham Huu Le Quoc Phuc',
            'License'=>'SCTV',
            'Description'=>'Customer Group');
    }
 
    public function simple_setup() { 
        return array('package' => __('Customer Group'), 'version'=>'1.0');
    }
 
    public function requires($v) {
        return array();
    }
 
    public function version() {
        return array('1.0');
    }
}
 
?>